import { createBrowserRouter } from 'react-router-dom'

import AuthLayout from '@/layouts/AuthLayout'
import Root from '@/Root'
import About from '@/views/About'
import Login from '@/views/auth/Login'
import Home from '@/views/Home'

const router = createBrowserRouter([
  {
    path: '/',
    element: <Root />,
    children: [
      {
        path: 'login',
        element: <Login />,
      },
      {
        element: <AuthLayout />,
        children: [{ path: 'home', element: <Home /> }],
      },
      { path: 'about', element: <About /> },
    ],
  },
])

export default router
